#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#pragma warning(disable : 4996)
void main() 
 {  
float a,b,c,d,x,k,l; 
printf("VVedite koef pri x2:\n");
scanf("%f",&a);
printf("VVedite koef pri x:\n");
scanf("%f",&b);
printf("VVedite svobodnii chlen:\n");
scanf("%f",&c);
if (a==0)
{   
if (b==0) printf ("Uravnenie ne imeet reheniy\n");
else printf ("Uravnenie ne kvadratnoe x= %.8g\n",x=-c/b); 
}   
else   
{   
b=b/a;
c=c/a;
d=b*b-(4*c);  
k=(-b+sqrt(double(d)))/2;
l=(-b-sqrt(double(d)))/2;
if (d<0) printf ("D<0 reshenij net\n");    
else if (d==0) printf ("D=0 Odno reshenie X=%.8g\n",x=-b/(2));   
else   
{   
			if (b<0)
			{
				printf ("Dva reshenija:\n");
				printf ("X1=%.8g\n",k);
				printf ("X2=%.8g\n",c/k);
			}
			else if (b>0)
			
			{
				printf ("Dva reshenija:\n");
				printf ("X1=.8g\n",l);
				printf ("X2=%.8g\n",c/l);

			}
		
}   
}   
system("PAUSE"); 
}
